package exeption;

import java.awt.*;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.sql.SQLDataException;

public class ThrowsDemo {
    public  void doSome() throws IOException, AWTException{}

}
class SubClass extends ThrowsDemo{
    //public void doSome() throws IOException, AWTException{}
    //子类重写超类方法时.可以不在抛出任何异常
    //public  void doSome(){}
    //许进抛出超类方法抛出的异常
    //public  void daSome(){}transient  IOException{}
    //语序抛出超类方法声明抛出异常的子类异常
   // public void doSme() throws FileNotFoundException{}

    //不允许抛出额外异常(超类方法没有声明抛出的且不存在继承关系的异常)
   // public void doSome() throws SQLDataException{}

    //不允许抛出超类方法声明抛出异常的超类型异常
    //public void doSome() throws Exception{}
}

